package com.ruoyi.school.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.mapper.JobImageMapper;
import com.ruoyi.school.domain.JobImage;
import com.ruoyi.school.service.IJobImageService;

/**
 * 就业服务图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-31
 */
@Service
public class JobImageServiceImpl implements IJobImageService 
{
    @Autowired
    private JobImageMapper jobImageMapper;

    /**
     * 查询就业服务图片
     * 
     * @param id 就业服务图片主键
     * @return 就业服务图片
     */
    @Override
    public JobImage selectJobImageById(Long id)
    {
        return jobImageMapper.selectJobImageById(id);
    }

    /**
     * 查询就业服务图片列表
     * 
     * @param jobImage 就业服务图片
     * @return 就业服务图片
     */
    @Override
    public List<JobImage> selectJobImageList(JobImage jobImage)
    {
        return jobImageMapper.selectJobImageList(jobImage);
    }

    /**
     * 新增就业服务图片
     * 
     * @param jobImage 就业服务图片
     * @return 结果
     */
    @Override
    public int insertJobImage(JobImage jobImage)
    {
        jobImage.setCreateTime(DateUtils.getNowDate());
        return jobImageMapper.insertJobImage(jobImage);
    }

    /**
     * 修改就业服务图片
     * 
     * @param jobImage 就业服务图片
     * @return 结果
     */
    @Override
    public int updateJobImage(JobImage jobImage)
    {
        jobImage.setUpdateTime(DateUtils.getNowDate());
        return jobImageMapper.updateJobImage(jobImage);
    }

    /**
     * 批量删除就业服务图片
     * 
     * @param ids 需要删除的就业服务图片主键
     * @return 结果
     */
    @Override
    public int deleteJobImageByIds(Long[] ids)
    {
        return jobImageMapper.deleteJobImageByIds(ids);
    }

    /**
     * 删除就业服务图片信息
     * 
     * @param id 就业服务图片主键
     * @return 结果
     */
    @Override
    public int deleteJobImageById(Long id)
    {
        return jobImageMapper.deleteJobImageById(id);
    }
}
